package com.itheima.info.system.manager.domain;

public class Student {
    private String name;
    private String sid;
    private int age;
    private String cls;
    private String gruop;

    public Student() {
    }

    public Student(String name, String sid, int age, String gruop) {
        this.name = name;
        this.sid = sid;
        this.age = age;
        this.gruop = gruop;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getCls() {
        return cls;
    }

    public void setCls(String cls) {
        this.cls = cls;
    }

    public String getGruop() {
        return gruop;
    }

    public void setGruop(String gruop) {
        this.gruop = gruop;
    }


    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", sid='" + sid + '\'' +
                ", age=" + age +
                ", gruop='" + gruop + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Student student = (Student) o;

        if (age != student.age) return false;
        if (name != null ? !name.equals(student.name) : student.name != null) return false;
        if (sid != null ? !sid.equals(student.sid) : student.sid != null) return false;
        if (cls != null ? !cls.equals(student.cls) : student.cls != null) return false;
        return gruop != null ? gruop.equals(student.gruop) : student.gruop == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (sid != null ? sid.hashCode() : 0);
        result = 31 * result + age;
        result = 31 * result + (cls != null ? cls.hashCode() : 0);
        result = 31 * result + (gruop != null ? gruop.hashCode() : 0);
        return result;
    }
}
